package cn.tianyigps.tianyigpsapiv2.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
@RequestMapping("/users")
public class UserController {

    @GetMapping("me")
    public Principal me(Principal principal) {
        return principal;
    }
    @GetMapping("/callback")
    public String me(String access_token) {
        System.out.println(access_token);
        return access_token;
    }
}
